$(function() {
	
	$('#file_upload').uploadify({
		'swf'      : SCOPE.uploadify_swf,
		'uploader' : SCOPE.image_uploader,
		'buttonText':'图片上传',
		'fileTypeDesc' : 'Image files',
		'fileObjName' : 'file',
		'fileTypeExts' :'*.jpg; *.png; *.gif',
		'onUploadSuccess' : function(file,data,response){
				// console.log(file);
				//console.log(typeof(data));
				//console.log(data);
				// console.log(response);
				if(response){

					var obj=JSON.parse(data);
					
					$('#upload_org_code_img').attr('src',obj.data);
					$('#file_upload_image').val(obj.data);
					$('#upload_org_code_img').show();
				}
		}
		
	});
	$('#file_upload_other').uploadify({
		'swf'      : SCOPE.uploadify_swf,
		'uploader' : SCOPE.image_uploader,
		'buttonText':'图片上传',
		'fileTypeDesc' : 'Image files',
		'fileObjName' : 'file',
		'fileTypeExts' :'*.jpg; *.png; *.gif',
		'onUploadSuccess' : function(file,data,response){
				// console.log(file);
				//console.log(typeof(data));
				//console.log(data);
				// console.log(response);
				if(response){

					var obj=JSON.parse(data);
					
					$('#upload_org_code_img_other').attr('src',obj.data);
					$('#file_upload_image_other').val(obj.data);
					$('#upload_org_code_img_other').show();
				}
		}
		
	});
});